package com.yh.service.impl;

import com.yh.Dao.IPagesDao;
import com.yh.Dao.Impl.PagesDaoImpl;
import com.yh.entity.Bord;
import com.yh.service.IPagesService;
import net.sf.json.JSONArray;

import java.util.List;


public class PagesService implements IPagesService {
              IPagesDao ipd=new PagesDaoImpl();

    @Override
    public JSONArray getPage(int pagesize, int pagenum) {
        JSONArray jsa=new JSONArray();
         List<Bord> list=ipd.getPage(pagesize,pagenum);
        jsa.addAll(list);

        return jsa;
    }

    @Override
    public int getCount() {
        return ipd.getCount();
    }
}
